package cn.wss.flowable.model;

import lombok.Data;
import org.flowable.engine.repository.ProcessDefinition;

import java.util.Map;

@Data
public class FlowableProcessDefinition {

  private String id;
  private String key;
  private String name;
  private int version;
  private String deploymentId;
  private String resourceName;
  private String tenantId;
  private Map<String, Object> variables;

  public FlowableProcessDefinition() {
  }

  public FlowableProcessDefinition(ProcessDefinition processDefinition) {
    this.id = processDefinition.getId();
    this.key = processDefinition.getKey();
    this.name = processDefinition.getName();
    this.version = processDefinition.getVersion();
    this.deploymentId = processDefinition.getDeploymentId();
    this.resourceName = processDefinition.getResourceName();
    this.tenantId = processDefinition.getTenantId();
  }
}
